package com.dream.inspect.modules.business.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.dream.inspect.modules.business.entity.SuperviseQuestionModifyEntity;

/**
 * 督察问题整改记录表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-06-16 17:04:51
 */
public interface SuperviseQuestionModifyDao extends BaseMapper<SuperviseQuestionModifyEntity> {
	/**
	 * 分页查询整改记录
	 * 
	 * @param wrapper  查询条件
	 * @param currPage 当前页数
	 * @param pageSize 每页大小
	 * @return
	 */
	List<SuperviseQuestionModifyEntity> findSuperviseQuestionModifyListByPage(
			@Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper, 
			@Param("currPage") int currPage,
            @Param("pageSize") int pageSize);
	
	/**
	 * 查询总件数
	 * 
	 * @param wrapper 查询条件
	 * @return
	 */
	int findSuperviseQuestionModifyListCount(
			@Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper);
	/**
	 * 查询整改记录(不分页)
	 * 
	 * @param wrapper 查询条件
	 * @return
	 */
	List<SuperviseQuestionModifyEntity> findSuperviseQuestionModifyList(
            @Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper);
	
	   /**
     * 分页查询整改历史记录
     * 
     * @param wrapper  查询条件
     * @param currPage 当前页数
     * @param pageSize 每页大小
     * @return
     */
    List<SuperviseQuestionModifyEntity> findSuperviseQuestionModifyHisByPage(
            @Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper, 
            @Param("currPage") int currPage,
            @Param("pageSize") int pageSize,
            @Param("userDeptName") String userDeptName);
    
    /**
     * 查询历史总件数
     * 
     * @param wrapper 查询条件
     * @return
     */
    int findSuperviseQuestionModifyHisCount(
            @Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper,
            @Param("userDeptName") String userDeptName);
    
    int selectThisMonthCount(@Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper);
    
    SuperviseQuestionModifyEntity findSuperviseQuestionMForSearchPage(
			@Param("id") String id);
	
	int findSuperviseQuestionMForSearchPageCount(@Param("ew") Wrapper<SuperviseQuestionModifyEntity> wrapper);
	
	List<SuperviseQuestionModifyEntity> selectSuperviseQuestionModifyListPage(Pagination page ,
			@Param("sqmEntity") SuperviseQuestionModifyEntity sqmEntity);
}
